import request from '@/utils/request';

// 采购入库列表
export function storageList(data) {
    return request({
        url: '/system/purInboundOrder/list',
        method: 'get',
        params: data
    })
}

// 查询采购入库详细信息
export function storageDetail(id) {
    return request({
        url: '/system/purInboundOrder/' + id,
        method: 'get'
    })
}

// 采购入库编辑
export function storageEdit(data) {
    return request({
        url: '/system/purInboundOrderDetail/edit',
        method: 'post',
        data: data
    })
}

// 确认/提交
export function storageConfirm(data) {
    return request({
        url: '/system/purInboundOrder/confirm',
        method: 'post',
        data: data
    })
}

// 审核
export function storageAudit(data) {
    return request({
        url: '/system/purInboundOrder/check',
        method: 'post',
        data: data
    })
}

// 获取多仓位列表
export function storageMorePosition(id) {
    return request({
        url: '/system/purInboundOrder/getPosition?id=' + id,
        method: 'get',
    })
}

// 多仓位新建数据
export function storageAddMorePosition(data) {
    return request({
        url: '/system/purInboundOrder/addPosition',
        method: 'post',
        data: data
    })
}

// 多仓位编辑新建
export function storageAddMorePositionData(data) {
    return request({
        url: '/system/productMultiPosition/add',
        method: 'post',
        data: data
    })
}

// 多仓位编辑数据
export function storageEditMorePosition(data) {
    return request({
        url: '/system/purInboundOrder/editPosition',
        method: 'post',
        data: data
    })
}

// 多仓位编辑仓位
export function storageUpdateMorePosition(data) {
    return request({
        url: '/system/purInboundOrder/updatePosition',
        method: 'post',
        data: data
    })
}

// 删除多仓位
export function storageDeleteMorePosition(data) {
    return request({
        url: '/system/productMultiPosition/removeOne',
        method: 'post',
        data: data
    })
}

// 删除单个多仓位
export function delMorePosition(id) {
    return request({
        url: '/system/purInboundOrder/removePosition?id=' + id,
        method: 'post'
    })
}

// 扫码入库
export function storageScanCode(data) {
    return request({
        url: '/system/purInboundOrder/scanForStorage',
        method: 'post',
        data: data
    })
}

// 删除扫码
export function storageDeleteScanCode(data) {
    return request({
        url: '/system/purInboundOrder/deleteScanCode',
        method: 'post',
        data: data
    })
}